import config from './config'
//结构，并赋初始值
export default function request({url,method="get",data={}}){
  return new Promise((resolve,reject)=>{
    wx.request({
      url:config.baseUrl + url,
      method,
      data,
      header:{
       cookie:'MUSIC_U=fbffff6fa3a38eb2bf164a225b15f739694c3f9b6b66d1d92b8c3af95412f0508a08bd5bf851808f4ae7fecab571dfaa02684034512dbdc69c52dea5659258caf05e21bdc335dbdc1b93ac14e0ed86ab'
      },
      success:res=>{
        resolve(res.data)
      },
      fail: err=>{
        reject(err)
      }
    })
  })
}
request({url:'/banner'})